/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package it.evento;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Ilo
 */
@Entity
@Table(name = "EVENTSFEEDBACK")
@NamedQueries({
    @NamedQuery(name = "Eventsfeedback.findAll", query = "SELECT e FROM Eventsfeedback e")})
public class Eventsfeedback implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    @GeneratedValue
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDEVENT")
    private int idevent;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDUSER")
    private int iduser;
    @Basic(optional = false)
    @NotNull
    @Column(name = "STARS")
    private double stars;

    public Eventsfeedback() {
    }

    public Eventsfeedback(Integer id) {
        this.id = id;
    }

    public Eventsfeedback(Integer id, int idevent, int iduser, double stars) {
        this.id = id;
        this.idevent = idevent;
        this.iduser = iduser;
        this.stars = stars;
    }
    
    public Eventsfeedback(int idevent, int iduser, double stars) {
        this.idevent = idevent;
        this.iduser = iduser;
        this.stars = stars;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getIdevent() {
        return idevent;
    }

    public void setIdevent(int idevent) {
        this.idevent = idevent;
    }

    public int getIduser() {
        return iduser;
    }

    public void setIduser(int iduser) {
        this.iduser = iduser;
    }

    public double getStars() {
        return stars;
    }

    public void setStars(double stars) {
        this.stars = stars;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Eventsfeedback)) {
            return false;
        }
        Eventsfeedback other = (Eventsfeedback) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "it.evento.Eventsfeedback[ id=" + id + " ]";
    }
    
}
